home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / pc / media / dirs / BackUp / WhatIsFire.dir / 00009_Script_fire objects < prev    next >
Text File  |  2002-10-15  |  974b  |  53 lines

  1. property spritenum,mysprite,myid,sequence,state,myrect,current
  2.  
  3. on new me
  4.   mysprite=sprite(spritenum)
  5.   sequence=["water","dirt","stir","dirt"]
  6.   myrect=mysprite.rect
  7.   state=0
  8.   current=1
  9. end
  10.  
  11. on getpropertydescriptionlist me
  12.   plist=[#myid:[#comment:"My type",#format:#string,#default:"dirt",#range:["water","dirt","stir"]]]
  13.   return plist
  14. end
  15.  
  16. on mousedown me
  17.   if state=0 then state=1
  18. end
  19.  
  20. on exitframe me
  21.   if state=1 then
  22.     if the stilldown then
  23.       mysprite.loc=the mouseloc
  24.     else
  25.       mouseup(me)
  26.     end if
  27.   end if
  28. end
  29.  
  30. on mouseup me
  31.   if mysprite.intersects(sprite(18)) then
  32.     if sequence[current]=myid then
  33.       sendallsprites(#turn_on,current)
  34.       mysprite.loch=(-2000)
  35.       state=2
  36.       puppetsound 1,"right"
  37.     else
  38.       mysprite.rect=myrect
  39.       state=0
  40.       puppetsound 1,"wrong"
  41.     end if
  42.   else
  43.     mysprite.rect=myrect
  44.     state=0
  45.   end if
  46. end
  47.  
  48. on turn_on me,x
  49.   current=x+1
  50. end
  51.  
  52.  
  53.